service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.vayu
    # "class hal" causes a race condition on some devices due to files created
    # in /data. As a workaround, postpone startup until later in boot once
    # /data is mounted.
    class late_start
    user system
    group system input uhid

on init
    # Goodix fingerprint
    chmod 0666 /dev/goodix_fp
    chown system system /dev/goodix_fp
    chmod 0664 /dev/fortsense_fp
    chown system system /dev/fortsense_fp

on boot
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/irq
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/irq_enable
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/wakeup_enable
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/hw_reset
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/device_prepare
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/fingerdown_wait
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/vendor
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/request_vreg
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/simulate_irq
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/finger_irq
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/request_vreg
    chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/power_cfg
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/irq
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/wakeup_enable
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/hw_reset
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/device_prepare
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/vendor
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/request_vreg
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/simulate_irq
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/finger_irq
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/request_vreg
    chmod 0700 /sys/bus/platform/devices/soc:fingerprint_fpc/power_cfg
    chown system system /sys/class/drm/card0-DSI-1/disp_param
    chmod 0700 /sys/class/drm/card0-DSI-1/disp_param
    chown system system /sys/class/drm/card0-DSI-1/panel_info
    chmod 0744 /sys/class/drm/card0-DSI-1/panel_info
    chmod 0666 /dev/input/event2

on post-fs-data
    mkdir /data/vendor/fpc 0770 system system
    mkdir /data/vendor/goodix 0770 system system
    mkdir /data/vendor/fpdump 0770 system system
    mkdir /data/vendor/fortsense 0770 system system
    mkdir /mnt/vendor/persist/goodix 0770 system system
    mkdir /mnt/vendor/persist/fpc 0770 system system
